package me.send.data.service.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import me.send.business.base.Pager;
import me.send.data.service.mapper.BrokerPrizeMapper;
import me.send.data.service.pojo.BrokerPrize;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BrokerPrizeService {
    @Autowired
    private BrokerPrizeMapper brokerPrizeMapper;
    
   
    // 使用分页查询
    public List<BrokerPrize> list(String phone,String realname,String city,
    		 String start, String end,Pager page) {
    	Map<String, Object> parameter = new HashMap<String, Object>();
    	parameter.put("phone", phone);
    	parameter.put("realname", realname);
    	parameter.put("city", city);
    	parameter.put("start", start);
    	parameter.put("end", end);
    	parameter.put("page", page);
    	List<BrokerPrize> rows = brokerPrizeMapper.list(parameter);
    	return rows;
    }
    
    public Integer count(String phone,String realname,String city,
    		String start, String end) {
    	Map<String, Object> parameter = new HashMap<String, Object>();
    	parameter.put("phone", phone);
    	parameter.put("realname", realname);
    	parameter.put("city", city);
    	Integer rows = brokerPrizeMapper.count(parameter);
    	return rows;
    }
    
   
}
